# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Testing.V1.Model.AndroidVersion do
  @moduledoc """
  A version of the Android OS.

  ## Attributes

  *   `apiLevel` (*type:* `integer()`, *default:* `nil`) - The API level for this Android version. Examples: 18, 19.
  *   `codeName` (*type:* `String.t`, *default:* `nil`) - The code name for this Android version. Examples: "JellyBean", "KitKat".
  *   `distribution` (*type:* `GoogleApi.Testing.V1.Model.Distribution.t`, *default:* `nil`) - Market share for this version.
  *   `id` (*type:* `String.t`, *default:* `nil`) - An opaque id for this Android version. Use this id to invoke the TestExecutionService.
  *   `releaseDate` (*type:* `GoogleApi.Testing.V1.Model.Date.t`, *default:* `nil`) - The date this Android version became available in the market.
  *   `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags for this dimension. Examples: "default", "preview", "deprecated".
  *   `versionString` (*type:* `String.t`, *default:* `nil`) - A string representing this version of the Android OS. Examples: "4.3", "4.4".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apiLevel => integer() | nil,
          :codeName => String.t() | nil,
          :distribution => GoogleApi.Testing.V1.Model.Distribution.t() | nil,
          :id => String.t() | nil,
          :releaseDate => GoogleApi.Testing.V1.Model.Date.t() | nil,
          :tags => list(String.t()) | nil,
          :versionString => String.t() | nil
        }

  field(:apiLevel)
  field(:codeName)
  field(:distribution, as: GoogleApi.Testing.V1.Model.Distribution)
  field(:id)
  field(:releaseDate, as: GoogleApi.Testing.V1.Model.Date)
  field(:tags, type: :list)
  field(:versionString)
end

defimpl Poison.Decoder, for: GoogleApi.Testing.V1.Model.AndroidVersion do
  def decode(value, options) do
    GoogleApi.Testing.V1.Model.AndroidVersion.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.AndroidVersion do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
